Optimal. Leaf size=162 \[ -\frac {a \tanh ^{-1}(a x)}{x}+a^3 x \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+a^2 \log (x)+2 a^2 \tanh ^{-1}(a x) \text {PolyLog}\left (2,1-\frac {2}{1-a x}\right )-2 a^2 \tanh ^{-1}(a x) \text {PolyLog}\left (2,-1+\frac {2}{1-a x}\right )-a^2 \text {PolyLog}\left (3,1-\frac {2}{1-a x}\right )+a^2 \text {PolyLog}\left (3,-1+\frac {2}{1-a x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps
used = 21, number of rules used = 15, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.682, Rules used =
{6159, 6037, 6129, 272, 36, 29, 31, 6095, 6033, 6199, 6205, 6745, 6127, 6021, 266}
\begin {gather*} \frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2+a^3 x \tanh ^{-1}(a x)-a^2 \text {Li}_3\left (1-\frac {2}{1-a x}\right )+a^2 \text {Li}_3\left (\frac {2}{1-a x}-1\right )+2 a^2 \text {Li}_2\left (1-\frac {2}{1-a x}\right ) \tanh ^{-1}(a x)-2 a^2 \text {Li}_2\left (\frac {2}{1-a x}-1\right ) \tanh ^{-1}(a x)+a^2 \log (x)-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )-\frac {\tanh ^{-1}(a x)^2}{2 x^2}-\frac {a \tanh ^{-1}(a x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 266
Rule 272
Rule 6021
Rule 6033
Rule 6037
Rule 6095
Rule 6127
Rule 6129
Rule 6159
Rule 6199
Rule 6205
Rule 6745
Rubi steps
\begin {align*} \int \frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{x^3} \, dx &=\int \left (\frac {\tanh ^{-1}(a x)^2}{x^3}-\frac {2 a^2 \tanh ^{-1}(a x)^2}{x}+a^4 x \tanh ^{-1}(a x)^2\right ) \, dx\\ &=-\left (\left (2 a^2\right ) \int \frac {\tanh ^{-1}(a x)^2}{x} \, dx\right )+a^4 \int x \tanh ^{-1}(a x)^2 \, dx+\int \frac {\tanh ^{-1}(a x)^2}{x^3} \, dx\\ &=-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+a \int \frac {\tanh ^{-1}(a x)}{x^2 \left (1-a^2 x^2\right )} \, dx+\left (8 a^3\right ) \int \frac {\tanh ^{-1}(a x) \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )}{1-a^2 x^2} \, dx-a^5 \int \frac {x^2 \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx\\ &=-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+a \int \frac {\tanh ^{-1}(a x)}{x^2} \, dx+a^3 \int \tanh ^{-1}(a x) \, dx-\left (4 a^3\right ) \int \frac {\tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{1-a^2 x^2} \, dx+\left (4 a^3\right ) \int \frac {\tanh ^{-1}(a x) \log \left (2-\frac {2}{1-a x}\right )}{1-a^2 x^2} \, dx\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+a^3 x \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1-a x}\right )-2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-a x}\right )+a^2 \int \frac {1}{x \left (1-a^2 x^2\right )} \, dx-\left (2 a^3\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1-a x}\right )}{1-a^2 x^2} \, dx+\left (2 a^3\right ) \int \frac {\text {Li}_2\left (-1+\frac {2}{1-a x}\right )}{1-a^2 x^2} \, dx-a^4 \int \frac {x}{1-a^2 x^2} \, dx\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+a^3 x \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+\frac {1}{2} a^2 \log \left (1-a^2 x^2\right )+2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1-a x}\right )-2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-a x}\right )-a^2 \text {Li}_3\left (1-\frac {2}{1-a x}\right )+a^2 \text {Li}_3\left (-1+\frac {2}{1-a x}\right )+\frac {1}{2} a^2 \text {Subst}\left (\int \frac {1}{x \left (1-a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+a^3 x \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+\frac {1}{2} a^2 \log \left (1-a^2 x^2\right )+2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1-a x}\right )-2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-a x}\right )-a^2 \text {Li}_3\left (1-\frac {2}{1-a x}\right )+a^2 \text {Li}_3\left (-1+\frac {2}{1-a x}\right )+\frac {1}{2} a^2 \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{2} a^4 \text {Subst}\left (\int \frac {1}{1-a^2 x} \, dx,x,x^2\right )\\ &=-\frac {a \tanh ^{-1}(a x)}{x}+a^3 x \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)^2}{2 x^2}+\frac {1}{2} a^4 x^2 \tanh ^{-1}(a x)^2-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+a^2 \log (x)+2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1-a x}\right )-2 a^2 \tanh ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-a x}\right )-a^2 \text {Li}_3\left (1-\frac {2}{1-a x}\right )+a^2 \text {Li}_3\left (-1+\frac {2}{1-a x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 183, normalized size = 1.13 \begin {gather*} -\frac {a \tanh ^{-1}(a x)}{x}+a^3 x \tanh ^{-1}(a x)+\frac {1}{2} a^2 \left (-1+a^2 x^2\right ) \tanh ^{-1}(a x)^2+\frac {\left (-1+a^2 x^2\right ) \tanh ^{-1}(a x)^2}{2 x^2}-4 a^2 \tanh ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1-a x}\right )+a^2 \log (x)-2 a^2 \tanh ^{-1}(a x) \text {PolyLog}\left (2,\frac {-1-a x}{-1+a x}\right )+2 a^2 \tanh ^{-1}(a x) \text {PolyLog}\left (2,\frac {1+a x}{-1+a x}\right )+a^2 \text {PolyLog}\left (3,\frac {-1-a x}{-1+a x}\right )-a^2 \text {PolyLog}\left (3,\frac {1+a x}{-1+a x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 21.69, size = 779, normalized size = 4.81 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a x - 1\right )^{2} \left (a x + 1\right )^{2} \operatorname {atanh}^{2}{\left (a x \right )}}{x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {atanh}\left (a\,x\right )}^2\,{\left (a^2\,x^2-1\right )}^2}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________